import { Entity, PrimaryGeneratedColumn, Column } from "typeorm";
import { IsNotEmpty, IsString } from "class-validator";

export interface ProjectLink{
  name: string
  url: string
}

@Entity('project')
export class Project {
  @PrimaryGeneratedColumn()
  id: number

  @Column({
    length: 40
  })
  name: string

  @Column()
  summary: string

  @Column()
  icon: string
  
  @Column('text')
  intro: string

  @Column({
    type: 'simple-json'
  })
  links: Array<ProjectLink>

  @Column({
    nullable: true
  })
  download: string

}
